package code.vo {

[Bindable]
public class OfferedTopic extends Topic {
	
	public var offeredTopicId: int;
	
	public function OfferedTopic(topicId: int, userId: int, categoryId: int, title: String, voteCnt: int, yetVoted: Boolean, offeredTopicId: int) {
		super(topicId, userId, categoryId, title, voteCnt, yetVoted);
		
		this.offeredTopicId = offeredTopicId;
		
	}


	public static function newByXml(xml: Object): OfferedTopic {
		return new OfferedTopic(
			int(xml.TopicId),
			int(xml.UserId),
			int(xml.CategoryId),
			String(xml.Title),
			int(xml.Vote.VoteCnt),
			int(xml.Vote.YetVoted) == 1,
			int(xml.OfferedTopicId)
		);
	}
	
}
}